<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/4/5
 * Time: 16:39
 */

namespace app\common\validate;


use think\Validate;

class Bases extends Validate
{
    protected  $rule = [
        'title|标题' => 'require',
        'author|作者' => 'require',
        'content|内容' => 'require',
        'defaulePageview|默认浏览' => 'require|integer',
        'address|地址' => 'require',
        'phone|电话' => 'require'


    ];

    //添加基地场景验证
    public function sceneAdd(){
        return $this->only(['title','content','defaulePageview','address','phone']);
    }

}